package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxfw_car_rotate;
import cn.bj.dao.Yxfw_car_rotateMapper;

@Service
public class CarRotateService {
	@Autowired
	Yxfw_car_rotateMapper yxfw_car_rotateMapper;

	// 查询所有
	public List<Yxfw_car_rotate> selectAllCarRotate() {
		return yxfw_car_rotateMapper.selectByExample(null);
	}

	// 插入
	public int insertCarRotate(Yxfw_car_rotate carRotate) {
		return yxfw_car_rotateMapper.insert(carRotate);
	}

	// 删除
	public int deleteCarRotate(Integer id) {
		return yxfw_car_rotateMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxfw_car_rotate selectById(Integer id) {
		return yxfw_car_rotateMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateCarR(Yxfw_car_rotate carR) {
		return yxfw_car_rotateMapper.updateByPrimaryKey(carR);
	}

}
